package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.domain.Role;
import cn.wolfcode.rbac.qo.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {

	/**
	 * 查询员工信息
	 */
	List<Employee> selectList(EmployeeQueryObject qo);

	/**
	 * 查询数量
	 */
	int selectCount(EmployeeQueryObject qo);

	//查询单个员工
	Employee selectOne(Long id);

	 List<Role> seleteRolesByEmployeeId(Long id);

	void UpdateByEmployeeId(Employee employee);

	void deleteRelationRole(Long employeeId);

	void insertRelationRoleIdAndEmployeeId(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

	Employee selectByName(String name);
	void insertEmployee(Employee employee);

	void deleteById(Long id);

	List<String> selectPermissonByEmployeeId(Long id);


}
